Svag matchende rim for document recognition system